home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Menu2 / DLL / MkStubsOs < prev    next >
Text File  |  1995-09-04  |  4KB  |  159 lines

  1.  
  2. ObjectFiles    =        \
  3.             o.Attach    \
  4.             o.Menu2    \
  5.             o.Msgs    \
  6.  
  7.  
  8. LibName        =    Menu2
  9.  
  10.  
  11.  
  12. # Template makefile to make all .o files
  13. # and the SDLS Stubs file for DeskLib
  14. # sublibraries.
  15. # Julian Smith 16 Mar 1995.
  16.  
  17.  
  18. # The macro $(ObjectFiles) should be set at the 
  19. # start of this file, to be a space-separated
  20. # list of object files.
  21. # This is done by 'Makatic'.
  22.  
  23.  
  24. # The macro $(LibName) should also be set at the 
  25. # start of this file, to be the name of the 
  26. # DeskLib sublibrary.
  27. # This is done by 'Makatic'.
  28.  
  29. # Compiler and linker flags, These can be anything. 
  30. # All flags required by Straylight (eg CC -zM and
  31. # Link -rmf) are included in the macros $(CC) and
  32. # $(LINK).
  33. #
  34. CCFlags        =    -fahi $(CCExtra) -depend !Depend -throwback -D_DeskLib_$(LibName) -I,C:
  35. ASMFlags    =    -Stamp -NoCache -CloseExec -Quit $(ASMExtra)
  36.  
  37.  
  38. # Macros for commands, including the Straylight
  39. # tool 'cdll'. Note that DRLink doesn't seem to
  40. # work with the SDLS.
  41. #
  42. CC        =    cc -c -zM -d_DLL -JC:DLLLib.,:mem $(CCFlags)
  43. ASM        =    ObjAsm $(ASMFlags)
  44. CDLL        =    cdll
  45. LINK        =    link
  46. AS        =    as -dde -throwback
  47.  
  48.  
  49. # filename of DLL Stubs aof file. This is linked with client apps.
  50. DLL_Stubs    =    Stubs
  51.  
  52.  
  53. # Filenames of intermediate files needed to make $(DLL_Lib) and $(DLL_Stubs).
  54. #
  55. # DLL_Def:        Standard definition file as per SDLS docs.
  56. # DLL_OtherStubsSource    Assembler source to be partially linked into
  57. #            the final stubs file. This will force linking
  58. #            in of stubs from any other DLLs used by this
  59. #            library when a client application is built.
  60. # DLL_PlainStubs    The vanilla stubs file created by SDLS's cdll.
  61. # DLL_OtherStubsObject    Assembled from DLL_OtherStubsSource. This
  62. #            simply imports __DeskLib_SDLS_Stubs_<libname>'s
  63. #            for all DeskLib DLLs used by this library, and
  64. #            exports __DeskLib_SDLS_Stubs_<thislibname>.
  65. #
  66. DLL_Def            =    ^.DLLDef
  67. DLL_OtherStubsSource    =    ^.OtherStubs
  68.  
  69. DLL_PlainStubs        =    PlainStubs
  70. DLL_OtherStubsObject    =    OSObj
  71.  
  72. # -------------------------------------------------------
  73. # Everything below here should probably not be changed...
  74. # -------------------------------------------------------
  75.  
  76.  
  77.  
  78. # Now all the rules...
  79.  
  80.  
  81. # Here's the two things we want to make...
  82. #
  83. All:    $(DLL_Stubs) $(ObjectFiles)
  84.  
  85. $(DLL_Stubs):    $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  86.     $(LINK) -aof -o $@ $(DLL_PlainStubs) $(DLL_OtherStubsObject)
  87.  
  88. $(DLL_PlainStubs):    $(DLL_Def)
  89.     $(CDLL) -def $(DLL_Def) -stub $(DLL_PlainStubs)
  90.  
  91.  
  92. #$(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  93. #    $(AS) -o $(DLL_OtherStubsObject) $(DLL_OtherStubsSource)
  94.  
  95. $(DLL_OtherStubsObject):    $(DLL_OtherStubsSource)
  96.     $(ASM) $(ASMFlags) -from $(DLL_OtherStubsSource) -to $(DLL_OtherStubsObject) 
  97.  
  98.  
  99. $(DLL_Def):    
  100.     | Warning: No DLL definition file exists.
  101.     | Creating a default DLL definition file: $(DLL_Def)
  102.     | This will have to be altered by hand.
  103.     $(CDLL) -def $(DLL_Def) -obj $(ObjectFiles)
  104.  
  105.  
  106.  
  107. # Rule for compiling C source code for a Straylight dynamically-linked library.
  108.  
  109. VPATH = @.^
  110.  
  111. .SUFFIXES:    .o .c .s
  112.  
  113. .c.o:
  114.     $(CC) -o $@ $<
  115.  
  116. .s.o:
  117.     $(ASM) $(ASMFlags) -from $< -to $@
  118.  
  119.  
  120.  
  121. # Dynamic dependencies:
  122. o.Attach:    ^.c.Attach
  123. o.Attach:    DeskLib:h.Event
  124. o.Attach:    DeskLib:h.Core
  125. o.Attach:    C:h.stddef
  126. o.Attach:    C:DLLLib.h.dll
  127. o.Attach:    C:h.kernel
  128. o.Attach:    DeskLib:h.Wimp
  129. o.Attach:    DeskLib:h.Menu2
  130. o.Attach:    DeskLib:h.Menu
  131. o.Menu2:    ^.c.Menu2
  132. o.Menu2:    C:h.stdlib
  133. o.Menu2:    DeskLib:h.Icon
  134. o.Menu2:    DeskLib:h.Wimp
  135. o.Menu2:    DeskLib:h.Core
  136. o.Menu2:    C:h.stddef
  137. o.Menu2:    C:DLLLib.h.dll
  138. o.Menu2:    C:h.kernel
  139. o.Menu2:    DeskLib:h.DragASpr
  140. o.Menu2:    DeskLib:h.WimpSWIs
  141. o.Menu2:    DeskLib:h.Event
  142. o.Menu2:    DeskLib:h.Menu
  143. o.Menu2:    DeskLib:h.Error
  144. o.Menu2:    DeskLib:h.Debug
  145. o.Menu2:    DeskLib:h.Menu2
  146. o.Msgs:    ^.c.Msgs
  147. o.Msgs:    DeskLib:h.Msgs
  148. o.Msgs:    DeskLib:h.Core
  149. o.Msgs:    C:h.stddef
  150. o.Msgs:    C:DLLLib.h.dll
  151. o.Msgs:    C:h.kernel
  152. o.Msgs:    DeskLib:h.Menu2
  153. o.Msgs:    DeskLib:h.Menu
  154. o.Msgs:    DeskLib:h.Wimp
  155. o.Msgs:    DeskLib:h.Event
  156. o.Msgs:    DeskLib:h.Str
  157. o.Msgs:    C:h.stddef
  158.